<?php

require_once '../../config.php';
require_once '../../functions.php';


books_get_current_user();

$netbook = book_fetch_all("select * from netbook");

function add(){
    if(empty($_POST['nick'])){
        $GLOBALS['message']="请填写昵称的信息";
        return;
    }
    if(empty($_POST['content'])){
        $GLOBALS['message']="请填写昵称";
        return;
    }
    $nick = $_POST['nick'];
    $content = $_POST['content'];
    $date = date('Y-m-d H:i:s' ,time());
    $row = book_execute("insert into netbook values (null,'{$nick}','{$content}','{$date}')");

}

if($_SERVER['REQUEST_METHOD']==='POST'){
    add();
}


?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Common &laquo; Admin</title>
    <link rel="stylesheet" href="/static/assets/vendors/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/assets/vendors/nprogress/nprogress.css">
    <script src="/static/assets/vendors/jquery/jquery.min.js"></script>
    <script src="/static/assets/vendors/bootstrap/js/bootstrap.min.js"></script>
    <script src="/static/assets/vendors/nprogress/nprogress.js"></script>
    <style>
        .lab {

            width: 1536px;
            height: 722px;
            position: relative;
        }

        .lab img {
            width: 100%;
            height: 100%;
        }

        ul {
            position: absolute;
            top: 50%;
            left: 50%;
            list-style-type: none;
            transform: translate(-50%, -50%);
            display: flex;
        }

        ul li {
            width: 200px;
            height: 200px;
            margin-right: 50px;
            text-align: center;
            line-height: 200px;
            background-color: #fff;
            border-radius: 12px;
            box-shadow: 2px 2px 20px #ccc;
            opacity: 0.4;
            user-select: none;
            font-size: 35px;
        }
    </style>
</head>

<body>
    <script>
        NProgress.start()
    </script>

    <div class="lab">
        <img src="/static/assets/img/lr.jpg" alt="">
    </div>
    <ul>
        <li><a href="/admin/users/change.php">流光溢彩</a></li>
        <li><a href="/admin/users/cloud.php">飞机</a></li>
        <li><a href="">等待 开通</a></li>
        
    </ul>
   
    <script>
        $('.collapse').collapse()
    </script>
    <script>
        NProgress.done()
    </script>
</body>

</html>